//
//  LSZRelatedVideoManager.m
//  JKFuYinProject
//
//  Created by 九酷 on 2018/4/19.
//  Copyright © 2018年 LC. All rights reserved.
//

#import "LSZRelatedVideoManager.h"

@implementation LSZRelatedVideoManager
-(id)initWithWithRelatedVideo :(NSDictionary *)dic
{
    self = [super init];
    if (self) {
        self.arrayData = [[NSMutableArray alloc]init];
        if ([[dic valueForKey:@"data"] isKindOfClass:[NSString class]]) {
            return self;
        }
        if ([[dic valueForKey:@"data"] isKindOfClass:[NSNumber class]]) {
            return self;
        }
        if (![dic valueForKey:@"data"]) {
            return self;
        }
        NSArray * arrayDataDic = dic[@"data"];
        NSMutableArray * mutAddArray = [[NSMutableArray alloc]init];
        for (NSDictionary * diction in arrayDataDic) {
            LSZRelatedVideoMg * manager = [[LSZRelatedVideoMg alloc]init];
            if ([[diction allKeys] containsObject:@"author"]) {
                manager.author = NullStringjudgment(NSStr(diction[@"author"]));
            }
            if ([[diction allKeys] containsObject:@"click"]) {
                manager.click = NullStringjudgment(NSStr(diction[@"click"]));
            }if ([[diction allKeys] containsObject:@"content"]) {
                manager.content = NullStringjudgment(NSStr(diction[@"content"]));
            }if ([[diction allKeys] containsObject:@"id"]) {
                manager.id_id = NullStringjudgment(NSStr(diction[@"id"]));
            }if ([[diction allKeys] containsObject:@"name"]) {
                manager.name = NullStringjudgment(NSStr(diction[@"name"]));
            }if ([[diction allKeys] containsObject:@"pic"]) {
                manager.pic = NullStringjudgment(NSStr(diction[@"pic"]));
            }if ([[diction allKeys] containsObject:@"zan"]) {
                manager.zan = NullStringjudgment(NSStr(diction[@"zan"]));
            }if ([[diction allKeys] containsObject:@"mp4_url"]) {
                manager.mp4_url = NullStringjudgment(NSStr(diction[@"mp4_url"]));
            }if ([[diction allKeys] containsObject:@"cat_name"]) {
                manager.cat_name = NullStringjudgment(NSStr(diction[@"cat_name"]));
            }if ([[diction allKeys] containsObject:@"type"]) {
                manager.type = NullStringjudgment(NSStr(diction[@"type"]));
            }
            if ([[diction allKeys] containsObject:@"album_id"]) {
                manager.album_id = NullStringjudgment(NSStr(diction[@"album_id"]));
            }if ([[diction allKeys] containsObject:@"album_name"]) {
                manager.album_name = NullStringjudgment(NSStr(diction[@"album_name"]));
            }
             [mutAddArray addObject:manager];
        }
        self.arrayData = mutAddArray;
    }
    return self;
}
@end
@implementation LSZRelatedVideoMg
@end
